package com.sxj.springsourcecode.enity;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

/**
 * @ProjectName: spring-source-code
 * @Package: com.sxj.springsourcecode.enity
 * @ClassName: UserDao
 * @Author: sxj
 * @Description:
 * @Date: 2024/2/21 10:51
 * @Version: 1.0.0
 */
@Slf4j
public class UserDao {
    private static Map<String,String> userInfo = new HashMap<>();
    static {
        userInfo.put("1","zhangsan");
        userInfo.put("2","lisi");
        userInfo.put("3","wangwu");
        userInfo.put("4","zhaoliu");
    }
    
    /**
     * TODO 
     * @param userId
     */
    public void queryUser(String userId){
        String userName = userInfo.get(userId);
        log.info("用户信息：Id是：{},用户名称是：{}！",userId,userName);
    }

    public void destory(){
        log.info("在调用:{}的销毁方法",this.getClass().getSimpleName());
    }
}
